import request from '@/utils/request'

export const getRolesRequest = (params) => {
  return request.get('api/sys/role', { params })
}

export const addRoleRequest = (data) => {
  return request.post('api/sys/role', data)
}

export const delRoleRequest = (id) => {
  return request.delete(`api/sys/role/${id}`)
}
export const putRoleRequest = (id) => {
  return request.put(`api/sys/role/${id}`)
}

export const updateRoleRequest = (data) => {
  return request.put(`api/sys/role/${data.id}`, data)
}
